#ifndef IODEVICEMANAGER_H
#define IODEVICEMANAGER_H

#include <map>
#include "IODeviceLib.h"
#include "IODeviceContext.h"
#include "IODeviceIF.h"

void InitialIODeviceManager(IODeviceContext* context);
IODeviceIF* GetDevice(IODeviceType type);
void DestroyIODeviceManager();

class IODeviceIF;

class IODeviceManager
{
public:
	IODeviceManager();
	virtual ~IODeviceManager();

	static IODeviceManager* GetInstance();

	static void Destroy();

	void Init(IODeviceContext* context);

	IODeviceIF* NewDevice(IODeviceType type, IODeviceContext* context);

	IODeviceIF* GetDevice(IODeviceType type);

private:
	static IODeviceManager* m_pInstance;

	std::map<IODeviceType, IODeviceIF*> m_mapDevices;
	
};

#endif